package UIFree.FX.pageturner
{
	import UIFree.uif_ecomponent;

	public class pt_creator {
		public static const list: Array = [
			{
				name	: 'Прозрачность',
				sclass	: pt_alphaTurner
			},{
				name	: 'Круги',
				sclass	: pt_circleTurner
			},{
				name	: 'Коллекция',
				sclass	: pt_collectTurner
			},{
				name	: 'Сердечки',
				sclass	: pt_heartTurner
			},{
				name	: '3Д переход',
				sclass	: pt_3DTurner
			},{
				name	: '3Д Картинка',
				sclass	: pt_card3DTurner
			}
		]
		
		public static function create(a_parent: uif_ecomponent, sliderIndex: int): pt_basePageTurner {
			return new (list[sliderIndex].sclass)(a_parent);
		}
		
		public static function random(a_parent: uif_ecomponent, no3D: Boolean = false): pt_basePageTurner {
			var index: int = Math.floor(Math.random() * (list.length - (no3D?2:0)));
			return create(a_parent, index);
		}
	}
}